package demo3.demo4;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Test {
    public static void main(String[] args) throws Exception {
        AnnotationConfigApplicationContext context=new AnnotationConfigApplicationContext("demo3/demo4");
        Person bean = context.getBean(Person.class);
//        bean.setName("lisi");
        System.out.println(bean);
//        Person bean2=context.getBean(Person.class);
//        bean2.setName("wangwu");
//        System.out.println(bean2);
//        System.out.println("容器关中");
//        bean.destroy();
//        context.close();
//        System.out.println("容器关闭了");

    }

}
